import { AreaEnum } from "@/enums/AreaEnum";
import request from "@/utils/request";

class CommonAPI {
  static getProvinceList() {
    return request<any, any>({
      url: "/areas/provinces",
      method: "get",
    });
  }

  static getAreaList(pid: number, level: AreaEnum) {
    return request<any, any>({
      url: `/areas/queryAreas`,
      method: "get",
      params: {
        pid,
        level,
      },
    });
  }

  static getEnums() {
    return request<any, any>({
      url: "/payment/setting/getBusinessTypes",
      method: "get",
      params: {},
    });
  }
  static getUploadEnums() {
    return request<any, any>({
      url: "/store/getLakalaFileTypes",
      method: "get",
      params: {},
    });
  }
}

export default CommonAPI;
